package net.cyue.easyconfiguration.node.converter;

import net.cyue.easyconfiguration.node.api.INodeTypeConverter;

public class Node2ClassConverter implements INodeTypeConverter<String, Class<?>> {
    @Override
    public Class<?> convert(String value, String... paths) {
        try {
            return Thread.currentThread().getContextClassLoader().loadClass(value);
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
    }
}
